package com.nengchuan.eic.nceconomy.dao;

import com.nengchuan.eic.nceconomy.entity.dto.ExcelDetailDTO;
import com.nengchuan.eic.nceconomy.entity.po.ExcelFile;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nengchuan.eic.nceconomy.entity.vo.SheetInfoVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * excel文件表 Mapper 接口
 * </p>
 *
 * @author luoping
 * @since 2020-04-23
 */
@Repository
public interface ExcelFileMapper extends BaseMapper<ExcelFile> {

    SheetInfoVO getSheetInfo(ExcelDetailDTO excelDetailDTO);

    ExcelDetailDTO getFirstSheet(@Param("pid") String pid, @Param("projectId")String projectId,
                                 @Param("categoryIndex")String category, @Param("projectIndex")String project,
                                 @Param("version")String version);

    //根据templateId、pid、projectId逻辑删除所有数据
    int logicDeleteByIdIn(@Param("ids") List<Long> ids,@Param("userId")Long userId,@Param("userName")String userName,@Param("time")Long time);

    /**
     * 根据项目查询本库的工程类型
     * @param projectId
     * @return
     */
    String getProjectTypeByProjectId(@Param("projectId") Long projectId,@Param("pid") Long pid,@Param("categoryIndex")String categoryIndex);
}
